/*
 * @Author: your name
 * @Date: 2021-09-06 19:47:54
 * @LastEditTime: 2021-10-28 20:20:44
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \ej-customer-cli\src\store\address\address.js
 */
import { post, get } from '@/http/axios'
export default {
  namespaced: true,
  state: {
    address:[]
  },
  mutations: {
    SET_ADDRESS(state,payload){
      state.address=payload
    }
  },
  actions: {
    async findAllAddress({commit},userId){
      let res = await get('/address/pageQuery',{
        page:1,
        pageSize:10,
        userId
      })
      commit('SET_ADDRESS',res.data.data.list)
    }
  }
}